Skip to content

Explicitly export core and std macros #139493

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

Voultapher
Copy link
Contributor

@Voultapher Voultapher commented Apr 7, 2025

Currently all core and std macros are automatically added to the prelude via #[macro_use]. However a situation arose where we want to add a new macro assert_matches but don't want to pull it into the standard prelude for compatibility reasons. By explicitly exporting the macros found in the core and std crates we get to decide on a per macro basis and can later add them via the rust_20xx preludes.

Closes #53977
Unlocks #137487

@rustbot
Copy link
Collaborator

rustbot commented Apr 7, 2025

r? @ChrisDenton

rustbot has assigned @ChrisDenton.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 7, 2025
@Voultapher
Copy link
Contributor Author

r? @Amanieu

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@Voultapher
Copy link
Contributor Author

@Amanieu the tidy issue highlights an annoying and unforeseen side-effect of this change. The vec module is now part of the prelude. In effect this means that for example this code:

fn xx(i: vec::IntoIter<i32>) {
    let _ = i.as_slice();
}

fn main() {}

that currently doesn't compile on stable would now compile. Initially I thought this would cause name collisions if users define their own vec module but so far I wasn't able to produce those, it seems to always prefer the local module. But regardless, I think we don't want to allow access to a standard library namespace without going through std, alloc or core. AFAIK there is no way to pub use only the macro and not the module namespace without modifications. I have two ideas how to tackle this, maybe we can rename vec to vec_xx internally and have separate use expressions or we have to add another crate that we can #[macro_use] inject into the prelude that only contains the vec macro. Thoughts?

@traviscross
Copy link
Contributor

@petrochenkov
Copy link
Contributor

There's an issue for this change - #53977.

@dtolnay
Copy link
Member

dtolnay commented Apr 8, 2025

@Voultapher, avoiding the vec module re-export can be done like this:

#[macro_export]
macro_rules! myvec {
    () => {};
}

pub mod myvec {
    pub struct Vec;
}

pub mod prelude {
    // Bad: re-exports both macro and type namespace
    // pub use crate::myvec;
    
    mod vec_macro_only {
        #[allow(hidden_glob_reexports)]
        mod myvec {}
        pub use crate::*;
    }
    pub use self::vec_macro_only::myvec;
}

fn main() {
    prelude::myvec!();
    let _: prelude::myvec::Vec; // error
}

https://play.rust-lang.org/?version=stable&mode=debug&edition=2024&gist=5e50828c593e04ba0e98f48c9d8696b4

@Voultapher
Copy link
Contributor Author

I've applied the suggestion by @dtolnay local tests seem promising. @Kobzol could we please do a timer run to see if this PR impacts compile-times.

@petrochenkov
Copy link
Contributor

env and panic (and maybe something else now?) need to be treated in the same way as vec.

@rust-log-analyzer

This comment has been minimized.

@Kobzol
Copy link
Contributor

Kobzol commented Apr 8, 2025

@Voultapher Based on the CI failure I think that a try build would fail now.

@Voultapher
Copy link
Contributor Author

Ok, I'll try to get the CI passing first.

@Voultapher
Copy link
Contributor Author

@petrochenkov I went through all macros and searched the docs and env and panic seem to be the only other ones affected.

@rust-log-analyzer

This comment has been minimized.

@Voultapher
Copy link
Contributor Author

@Amanieu this program previously worked:

use std::*;

fn main() {
    panic!("panic works")
}

and now runs into:

error[E0659]: `panic` is ambiguous
   --> src/main.rs:4:5
    |
4   |     panic!("panic works")
    |     ^^^^^ ambiguous name
    |
    = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
note: `panic` could refer to the macro imported here
   --> src/main.rs:1:5
    |
1   | use std::*;
    |     ^^^^^^
    = help: consider adding an explicit import of `panic` to disambiguate
    = help: or use `crate::panic` to refer to this macro unambiguously
note: `panic` could also refer to the macro defined here
   --> rust/library/std/src/prelude/mod.rs:157:13
    |
157 |     pub use super::v1::*;
    |             ^^^^^^^^^

I don't see how we can resolve that without changing language import rules and or special casing the prelude import.

@Amanieu
Copy link
Member

Amanieu commented Apr 9, 2025

@petrochenkov Do you have any ideas about that?

@petrochenkov petrochenkov self-assigned this Apr 9, 2025
@petrochenkov
Copy link
Contributor

Could you add a test making sure that the modules vec, env and panic are not in prelude?

@petrochenkov
Copy link
Contributor

@petrochenkov Do you have any ideas about that?

The ambiguity wouldn't happen if it was the same panic in std root and in the stdlib prelude.
However, std and core have two different panic macros.

Previously #[macro_use] extern crate std; would add the std's panic to macro_use prelude, and #[macro_use] extern crate core; would add the core's panic.
This PR always adds the core's panic.

@petrochenkov petrochenkov added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 10, 2025
@@ -387,34 +387,6 @@ LL | impl <T = impl Debug> T {}
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #36887 <https://github.com/rust-lang/rust/issues/36887>

error[E0283]: type annotations needed
--> $DIR/where-allowed.rs:46:57
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why this error has disappeared.
Looks like it's still reported if the erroneous case is isolated from other errors, but I'm not sure how the prelude changes could cause something like this?

Copy link
Contributor Author

@Voultapher Voultapher Jun 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed the same with isolated reproduction. My guess is it's some subtle compiler bug that requires the surrounding context. My gut feeling is, since it involves nightly APIs and only changes error messages this isn't a blocker for shipping.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs to be debugged, the errors shouldn't just disappear from unrelated changes.
In the worst case these test cases need to be moved to a separate test file so their errors reproduce as previously.

@petrochenkov
Copy link
Contributor

The private_macro_use lint is fixed in #141934.
@rustbot blocked

@rustbot rustbot added S-blocked Status: Blocked on something else such as an RFC or other implementation work. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jun 2, 2025
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 12, 2025
…r-errors

resolve: Tweak `private_macro_use` lint to be compatible with upcoming macro prelude changes

Unblocks rust-lang#139493.
Zulip thread requesting help - [#t-compiler/help > Help requested for effects of rust-lang#139493](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Help.20requested.20for.20effects.20of.20.23139493/with/514653911).

This PR by itself shouldn't cause any observable changes, its only observable effect is that the prelude changes from rust-lang#139493 will no longer cause regressions in tests like `tests/ui/imports/issue-119369.rs` or `tests/ui/extern/issue-80074.rs`.

This is achieved by moving the "is this thing in stdlib prelude" check from an early point (`fn process_macro_use_imports`) to a later point (`fn record_use_inner`), at which the stdlib prelude is already populated and can be inspected.
(The `is_builtin_macro` check is subsumed by the stdlib prelude check, all built-in macros go through the stdlib prelude anyway.)
workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 12, 2025
…r-errors

resolve: Tweak `private_macro_use` lint to be compatible with upcoming macro prelude changes

Unblocks rust-lang#139493.
Zulip thread requesting help - [#t-compiler/help > Help requested for effects of rust-lang#139493](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Help.20requested.20for.20effects.20of.20.23139493/with/514653911).

This PR by itself shouldn't cause any observable changes, its only observable effect is that the prelude changes from rust-lang#139493 will no longer cause regressions in tests like `tests/ui/imports/issue-119369.rs` or `tests/ui/extern/issue-80074.rs`.

This is achieved by moving the "is this thing in stdlib prelude" check from an early point (`fn process_macro_use_imports`) to a later point (`fn record_use_inner`), at which the stdlib prelude is already populated and can be inspected.
(The `is_builtin_macro` check is subsumed by the stdlib prelude check, all built-in macros go through the stdlib prelude anyway.)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 12, 2025
…r-errors

resolve: Tweak `private_macro_use` lint to be compatible with upcoming macro prelude changes

Unblocks rust-lang#139493.
Zulip thread requesting help - [#t-compiler/help > Help requested for effects of rust-lang#139493](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Help.20requested.20for.20effects.20of.20.23139493/with/514653911).

This PR by itself shouldn't cause any observable changes, its only observable effect is that the prelude changes from rust-lang#139493 will no longer cause regressions in tests like `tests/ui/imports/issue-119369.rs` or `tests/ui/extern/issue-80074.rs`.

This is achieved by moving the "is this thing in stdlib prelude" check from an early point (`fn process_macro_use_imports`) to a later point (`fn record_use_inner`), at which the stdlib prelude is already populated and can be inspected.
(The `is_builtin_macro` check is subsumed by the stdlib prelude check, all built-in macros go through the stdlib prelude anyway.)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 12, 2025
…r-errors

resolve: Tweak `private_macro_use` lint to be compatible with upcoming macro prelude changes

Unblocks rust-lang#139493.
Zulip thread requesting help - [#t-compiler/help > Help requested for effects of rust-lang#139493](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Help.20requested.20for.20effects.20of.20.23139493/with/514653911).

This PR by itself shouldn't cause any observable changes, its only observable effect is that the prelude changes from rust-lang#139493 will no longer cause regressions in tests like `tests/ui/imports/issue-119369.rs` or `tests/ui/extern/issue-80074.rs`.

This is achieved by moving the "is this thing in stdlib prelude" check from an early point (`fn process_macro_use_imports`) to a later point (`fn record_use_inner`), at which the stdlib prelude is already populated and can be inspected.
(The `is_builtin_macro` check is subsumed by the stdlib prelude check, all built-in macros go through the stdlib prelude anyway.)
rust-timer added a commit that referenced this pull request Jun 13, 2025
Rollup merge of #141934 - petrochenkov:privmacuse, r=compiler-errors

resolve: Tweak `private_macro_use` lint to be compatible with upcoming macro prelude changes

Unblocks #139493.
Zulip thread requesting help - [#t-compiler/help > Help requested for effects of #139493](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Help.20requested.20for.20effects.20of.20.23139493/with/514653911).

This PR by itself shouldn't cause any observable changes, its only observable effect is that the prelude changes from #139493 will no longer cause regressions in tests like `tests/ui/imports/issue-119369.rs` or `tests/ui/extern/issue-80074.rs`.

This is achieved by moving the "is this thing in stdlib prelude" check from an early point (`fn process_macro_use_imports`) to a later point (`fn record_use_inner`), at which the stdlib prelude is already populated and can be inspected.
(The `is_builtin_macro` check is subsumed by the stdlib prelude check, all built-in macros go through the stdlib prelude anyway.)
@petrochenkov
Copy link
Contributor

#141934 has landed, unblocking.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-blocked Status: Blocked on something else such as an RFC or other implementation work. labels Jun 13, 2025
@rustbot
Copy link
Collaborator

rustbot commented Jun 13, 2025

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@Voultapher
Copy link
Contributor Author

I'll try to get to it next week.

Currently all core and std macros are automatically added to the prelude
via #[macro_use]. However a situation arose where we want to add a new macro
`assert_matches` but don't want to pull it into the standard prelude for
compatibility reasons. By explicitly exporting the macros found in the core and
std crates we get to decide on a per macro basis and can later add them via
the rust_20xx preludes.
@Voultapher Voultapher force-pushed the explicitly-export-core-and-std-macros branch from 87be0d7 to 46800d5 Compare June 25, 2025 11:49
@Voultapher
Copy link
Contributor Author

Voultapher commented Jun 25, 2025

I've rebased the branch on master and fixed some outstanding issues. However there is still one issue remaining and that's related to the where-allowed test. Digging into it I found the following code works on nightly, but not with this version:

#![feature(custom_inner_attributes)]
#![rustfmt::skip]
use std::fmt::Debug;

fn in_parameters(_: impl Debug) { todo!() }

fn main() {}
error: cannot determine resolution for the macro `todo`
 --> src/main.rs:6:35
  |
6 | fn in_parameters(_: impl Debug) { todo!() }
  |                                   ^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

If #![rustfmt::skip] is uncommented both versions can compile it. Intuitively I fail to see how the additional #![rustfmt::skip] attributes should get the resolver stuck. I suspect it's some kind of compiler bug, maybe connected to the bug that makes some errors disappear in the where-allowed test. I'm looking into it, but don't feel particularly hopeful that I'll find the issue, given my lack of knowledge in the area.

EDIT: This is likely a red herring for another issue. Ignore it for now.

@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-19-2 failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/vec_deque/tests.rs:765:55
    |
765 |     assert_eq!(deque.into_iter().collect::<Vec<_>>(), vec![9, 10, 1, 2, 3]);
    |                                                       ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:969:58
    |
969 |         assert_eq!(list.into_iter().collect::<Vec<_>>(), vec![1, 3, 5, 7, 9, 11, 13, 15, 17, 19]);
    |                                                          ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:966:29
    |
966 |         assert_eq!(removed, vec![2, 4, 6, 8, 10, 12, 14, 16, 18, 20]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:955:58
    |
955 |         assert_eq!(list.into_iter().collect::<Vec<_>>(), vec![1, 3, 5, 7, 9, 11, 13, 15, 17, 19]);
    |                                                          ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:952:29
    |
952 |         assert_eq!(removed, vec![2, 4, 6, 8, 10, 12, 14, 16, 18, 20]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:935:29
    |
935 |         assert_eq!(removed, vec![2, 4, 6, 18, 20, 22, 24, 26, 34, 36]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:917:29
    |
917 |         assert_eq!(removed, vec![2, 4, 6, 18, 20, 22, 24, 26, 34, 36]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:899:29
    |
899 |         assert_eq!(removed, vec![2, 4, 6, 18, 20, 22, 24, 26, 34, 36]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:859:54
    |
859 |     assert_eq!(list.into_iter().collect::<Vec<_>>(), vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
    |                                                      ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:774:14
    |
774 |     a.extend(vec![2, 3, 4]); // uses iterator
    |              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `format` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:525:16
    |
525 |     assert_eq!(format!("{list:?}"), "[\"just\", \"one\", \"test\", \"more\"]");
    |                ^^^^^^
    |
help: consider importing one of these macros
    |
1   + use crate::format;
    |
1   + use std::format;
    |

error: cannot find macro `format` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:522:16
    |
522 |     assert_eq!(format!("{list:?}"), "[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]");
    |                ^^^^^^
    |
help: consider importing one of these macros
    |
1   + use crate::format;
---
[RUSTC-TIMING] vec_deque_alloc_error test:true 0.274
error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:444:17
    |
444 |         let u = vec![1, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:430:17
    |
430 |         let u = vec![1, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:293:17
    |
293 |         let u = vec![9, 8, 1, 2, 3];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:292:17
    |
292 |         let v = vec![1, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:280:17
    |
280 |         let u = vec![6, 7, 8];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:279:17
    |
279 |         let v = vec![1, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:267:17
    |
267 |         let u = vec![8, 7, 6, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:266:17
    |
266 |         let v = vec![1, 2, 3, 4, 5];
    |                 ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:125:13
    |
125 |     let u = vec![9, 8, 1, 2, 3, 4, 5];
    |             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/linked_list/tests.rs:124:13
    |
124 |     let v = vec![1, 2, 3, 4, 5];
    |             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
---

error: cannot find macro `format` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/set/tests.rs:709:17
    |
709 |         let _ = format!("{set:?}");
    |                 ^^^^^^
    |
help: consider importing one of these macros
    |
1   + use crate::format;
    |
1   + use std::format;
    |

error: cannot find macro `format` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/set/tests.rs:494:16
    |
494 |     assert_eq!(format!("{empty:?}"), "{}");
    |                ^^^^^^
    |
help: consider importing one of these macros
    |
1   + use crate::format;
    |
1   + use std::format;
    |

error: cannot find macro `format` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/set/tests.rs:491:19
    |
491 |     let set_str = format!("{set:?}");
    |                   ^^^^^^
    |
help: consider importing one of these macros
    |
1   + use crate::format;
    |
1   + use std::format;
    |

error: cannot find macro `format` in this scope
##[error]  --> alloctests/../alloc/src/collections/btree/node/tests.rs:32:28
   |
32 |                 result += &format!("\n{}{:?}", indent, leaf.keys());
   |                            ^^^^^^
   |
help: consider importing one of these macros
   |
1  + use crate::format;
   |
1  + use std::format;
   |

error: cannot find macro `vec` in this scope
##[error]    --> alloctests/../alloc/src/collections/btree/map/tests.rs:2349:24
     |
2349 |     for panic_point in vec![0, 1, size - 2, size - 1] {
     |                        ^^^
     |
help: consider importing one of these macros
     |
1    + use crate::vec;
---

error: cannot find macro `format` in this scope
##[error]    --> alloctests/../alloc/src/collections/btree/map/tests.rs:1825:17
     |
1825 |         let _ = format!("{map:?}");
     |                 ^^^^^^
     |
help: consider importing one of these macros
     |
1    + use crate::format;
     |
1    + use std::format;
     |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:712:30
    |
712 |     check(map.range(-1..=2), vec![(&1, &1), (&2, &2)]);
    |                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:711:29
    |
711 |     check(map.range(5..=8), vec![(&5, &5), (&6, &6), (&7, &7), (&8, &8)]);
    |                             ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:700:67
    |
700 |     assert_eq!(range_keys(&map, (Included(size + 1), Unbounded)), vec![]);
    |                                                                   ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:699:76
    |
699 |     assert_eq!(range_keys(&map, (Included(size + 1), Included(size + 1))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:698:76
    |
698 |     assert_eq!(range_keys(&map, (Included(size + 1), Excluded(size + 1))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:697:63
    |
697 |     assert_eq!(range_keys(&map, (Excluded(size), Unbounded)), vec![]);
    |                                                               ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:696:68
    |
696 |     assert_eq!(range_keys(&map, (Excluded(size), Included(size))), vec![]);
    |                                                                    ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:695:72
    |
695 |     assert_eq!(range_keys(&map, (Excluded(size), Excluded(size + 1))), vec![]);
    |                                                                        ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:678:60
    |
678 |     assert_eq!(range_keys(&map, (Unbounded, Included(0))), vec![]);
    |                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:677:60
    |
677 |     assert_eq!(range_keys(&map, (Unbounded, Excluded(1))), vec![]);
    |                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:676:62
    |
676 |     assert_eq!(range_keys(&map, (Included(0), Excluded(1))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:675:62
    |
675 |     assert_eq!(range_keys(&map, (Included(0), Included(0))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:674:62
    |
674 |     assert_eq!(range_keys(&map, (Excluded(0), Included(0))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:673:62
    |
673 |     assert_eq!(range_keys(&map, (Excluded(0), Excluded(1))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:653:40
    |
653 |     let (first, last) = (vec![all[0]], vec![all[size as usize - 1]]);
    |                                        ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:653:26
    |
653 |     let (first, last) = (vec![all[0]], vec![all[size as usize - 1]]);
    |                          ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:644:76
    |
644 |         assert_eq!(range_keys(&map, (Included(root - 1), Included(root))), vec![root - 1, root]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:643:76
    |
643 |         assert_eq!(range_keys(&map, (Excluded(root - 1), Included(root))), vec![root]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:642:76
    |
642 |         assert_eq!(range_keys(&map, (Included(root - 1), Excluded(root))), vec![root - 1]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:641:76
    |
641 |         assert_eq!(range_keys(&map, (Excluded(root - 1), Excluded(root))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:639:76
    |
639 |         assert_eq!(range_keys(&map, (Included(root), Included(root + 1))), vec![root, root + 1]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:638:76
    |
638 |         assert_eq!(range_keys(&map, (Included(root), Excluded(root + 1))), vec![root]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:637:76
    |
637 |         assert_eq!(range_keys(&map, (Excluded(root), Included(root + 1))), vec![root + 1]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:636:76
    |
636 |         assert_eq!(range_keys(&map, (Excluded(root), Excluded(root + 1))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:626:41
    |
626 |     assert_eq!(range_keys(&map, 2..=3), vec![2, 3]);
    |                                         ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:625:39
    |
625 |     assert_eq!(range_keys(&map, 3..), vec![3, 4]);
    |                                       ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:624:39
    |
624 |     assert_eq!(range_keys(&map, ..3), vec![1, 2]);
    |                                       ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:622:67
    |
622 |     assert_eq!(range_keys(&map, (Included(size + 1), Unbounded)), vec![]);
    |                                                                   ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:621:76
    |
621 |     assert_eq!(range_keys(&map, (Included(size + 1), Included(size + 1))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:620:76
    |
620 |     assert_eq!(range_keys(&map, (Included(size + 1), Excluded(size + 1))), vec![]);
    |                                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:619:63
    |
619 |     assert_eq!(range_keys(&map, (Excluded(size), Unbounded)), vec![]);
    |                                                               ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:618:68
    |
618 |     assert_eq!(range_keys(&map, (Excluded(size), Included(size))), vec![]);
    |                                                                    ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:617:72
    |
617 |     assert_eq!(range_keys(&map, (Excluded(size), Excluded(size + 1))), vec![]);
    |                                                                        ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:600:60
    |
600 |     assert_eq!(range_keys(&map, (Unbounded, Included(0))), vec![]);
    |                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:599:60
    |
599 |     assert_eq!(range_keys(&map, (Unbounded, Excluded(1))), vec![]);
    |                                                            ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:598:62
    |
598 |     assert_eq!(range_keys(&map, (Included(0), Excluded(1))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:597:62
    |
597 |     assert_eq!(range_keys(&map, (Included(0), Included(0))), vec![]);
    |                                                              ^^^
    |
help: consider importing one of these macros
    |
1   + use crate::vec;
    |
1   + use std::vec;
    |

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/btree/map/tests.rs:596:62
    |
596 |     assert_eq!(range_keys(&map, (Excluded(0), Included(0))), vec![]);
    |                                                              ^^^
---

error: cannot find macro `vec` in this scope
##[error]   --> alloctests/../alloc/src/collections/binary_heap/mod.rs:515:28
    |
515 |         BinaryHeap { data: vec![] }
    |                            ^^^
    |
note: `vec` is imported here, but it is a module, not a macro
   --> alloctests/../alloc/src/collections/binary_heap/mod.rs:158:18
    |
---

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/vec_deque/tests.rs:1087:5
     |
1087 |       struct_with_counted_drop!(Elem, DROPS);
     |       -------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/vec_deque/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/linked_list/tests.rs:1087:5
     |
1087 |       struct_with_counted_drop!(D(bool), DROPS => |this: &D| if this.0 { panic!("panic in `drop`"); } );
     |       ------------------------------------------------------------------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/linked_list/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/linked_list/tests.rs:1070:5
     |
1070 |       struct_with_counted_drop!(Elem, DROPS);
     |       -------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/linked_list/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/linked_list/tests.rs:1052:5
     |
1052 |       struct_with_counted_drop!(Elem, DROPS);
     |       -------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/linked_list/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/linked_list/tests.rs:1038:5
     |
1038 |       struct_with_counted_drop!(Elem, DROPS);
     |       -------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/linked_list/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error: cannot find macro `thread_local` in this scope
##[error]    --> alloctests/testing/macros.rs:3:9
     |
1    | / macro_rules! struct_with_counted_drop {
2    | |     ($struct_name:ident $(( $( $elt_ty:ty ),+ ))?, $drop_counter:ident $( => $drop_stmt:expr )? ) => {
3    | |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     | |         ^^^^^^^^^^^^
...    |
34   | |     };
35   | | }
     | |_- in this expansion of `struct_with_counted_drop!`
     |
    ::: alloctests/../alloc/src/collections/linked_list/tests.rs:1016:5
     |
1016 |       struct_with_counted_drop!(D(u32), DROPS);
     |       ---------------------------------------- in this macro invocation
     |
     = note: `thread_local` is in scope, but it is an attribute: `#[thread_local]`
help: consider importing this macro
    -->  alloctests/../alloc/src/collections/linked_list/tests.rs:1:1
     |
1    + use std::thread_local;
     |

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1016:39
     |
1016 |     struct_with_counted_drop!(D(u32), DROPS);
     |                                       ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1032:16
     |
1032 |     assert_eq!(DROPS.get(), 2); // 0 and 1
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1038:37
     |
1038 |     struct_with_counted_drop!(Elem, DROPS);
     |                                     ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1047:16
     |
1047 |     assert_eq!(DROPS.get(), 4);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1052:37
     |
1052 |     struct_with_counted_drop!(Elem, DROPS);
     |                                     ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1062:16
     |
1062 |     assert_eq!(DROPS.get(), 2);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1065:16
     |
1065 |     assert_eq!(DROPS.get(), 4);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1070:37
     |
1070 |     struct_with_counted_drop!(Elem, DROPS);
     |                                     ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1078:16
     |
1078 |     assert_eq!(DROPS.get(), 4);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1081:16
     |
1081 |     assert_eq!(DROPS.get(), 4);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1087:40
     |
1087 |     struct_with_counted_drop!(D(bool), DROPS => |this: &D| if this.0 { panic!("panic in `drop`"); } );
     |                                        ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/linked_list/tests.rs:1101:16
     |
1101 |     assert_eq!(DROPS.get(), 8);
     |                ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/vec_deque/tests.rs:1087:37
     |
1087 |     struct_with_counted_drop!(Elem, DROPS);
     |                                     ^^^^^ not found in this scope
     |
    ::: alloctests/testing/macros.rs:3:31
     |
3    |         thread_local! {static $drop_counter: ::core::cell::Cell<u32> = ::core::cell::Cell::new(0);}
     |                               ------------- due to this macro variable

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/vec_deque/tests.rs:1099:20
     |
1099 |         assert_eq!(DROPS.get(), 0);
     |                    ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/vec_deque/tests.rs:1101:20
     |
1101 |         assert_eq!(DROPS.get(), 2);
     |                    ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/vec_deque/tests.rs:1103:20
     |
1103 |         assert_eq!(DROPS.get(), 5);
     |                    ^^^^^ not found in this scope

error[E0425]: cannot find value `DROPS` in this scope
##[error]    --> alloctests/../alloc/src/collections/vec_deque/tests.rs:1104:9
     |
---
warning: build failed, waiting for other jobs to finish...
[RUSTC-TIMING] allocbenches test:true 6.835
[RUSTC-TIMING] corebenches test:true 7.766
[RUSTC-TIMING] alloctests test:true 11.966
env -u RUSTC_WRAPPER CARGO_ENCODED_RUSTDOCFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Dwarnings\u{1f}-Wrustdoc::invalid_codeblock_attributes\u{1f}--crate-version\u{1f}1.90.0-nightly\t(d507d7f82\t2025-06-25)" CARGO_ENCODED_RUSTFLAGS="-Csymbol-mangling-version=v0\u{1f}-Zrandomize-layout\u{1f}-Zunstable-options\u{1f}--check-cfg=cfg(bootstrap)\u{1f}--check-cfg=cfg(llvm_enzyme)\u{1f}-Zmacro-backtrace\u{1f}-Csplit-debuginfo=off\u{1f}-Clink-arg=-L/usr/lib/llvm-19/lib\u{1f}-Cllvm-args=-import-instr-limit=10\u{1f}-Clink-args=-Wl,-z,origin\u{1f}-Clink-args=-Wl,-rpath,$ORIGIN/../lib\u{1f}-Alinker-messages\u{1f}--cap-lints=allow\u{1f}--cfg\u{1f}randomized_layouts" RUSTC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/dist/rustc-clif" RUSTDOC="/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/dist/rustdoc-clif" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage0/bin/cargo" "test" "--manifest-path" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/build/sysroot_tests/Cargo.toml" "--target-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage1-tools/cg_clif/build/sysroot_tests_target" "--locked" "--target" "aarch64-unknown-linux-gnu" "-p" "coretests" "-p" "alloctests" "--tests" "--" "-q" exited with status ExitStatus(unix_wait_status(25856))
Command has failed. Rerun with -v to see more details.
Build completed unsuccessfully in 0:10:47
  local time: Wed Jun 25 12:11:12 UTC 2025
  network time: Wed, 25 Jun 2025 12:11:12 GMT
##[error]Process completed with exit code 1.
Post job cleanup.

@bors
Copy link
Collaborator

bors commented Jun 27, 2025

☔ The latest upstream changes (presumably #143057) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. T-rustdoc-frontend Relevant to the rustdoc-frontend team, which will review and decide on the web UI/UX output.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Do not apply #[macro_use] to implicitly injected extern crate std;, use standard library prelude instead